import http from '@/api/request';

// 获取用户信息
export const getFansInfo = () => {
  return http.request({
    method: 'GET',
    url: '/app/fans/info',
  });
};

// 编辑用户信息
export const setFans = (form: object) => {
  return http.request({
    method: 'POST',
    url: '/app/fans/update',
    data: form,
  });
};

// 重置密码
export const resetPassword = (form: object) => {
  return http.request({
    method: 'POST',
    url: '/app/fans/reset_password',
    data: form,
  });
};

// 更换手机号
export const changePhone = (form: object) => {
  return http.request({
    method: 'POST',
    url: '/app/fans/change_phone',
    data: form,
  });
};

// 退出登录
export const logout = () => {
  return http.request({
    method: 'POST',
    url: '/app/fans/logout',
  });
};
